package org.nekperu15739.me.persistencejpa.dao.abstracts.i18n;

import java.util.List;

import javax.persistence.Query;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.nekperu15739.me.persistencejpa.dao.abstracts.DaoAbstract;
import org.nekperu15739.me.persistencejpa.dao.interfaces.i18n.LanguageDao;
import org.nekperu15739.me.persistencejpa.entities.implementation.i18n.LanguageEntityJpa;

/**
 * 
 * @author charly
 *
 */
public abstract class LanguajeDaoAbstract extends
        DaoAbstract<LanguageEntityJpa, Integer> implements LanguageDao {

    private final Log logger = LogFactory.getLog(getClass());

//    @SuppressWarnings({ "unchecked" })
//    @Override
//    public List<LanguageEntityJpa> selectByLanguage(
//            LanguageEntityJpa languageEntityJpa) {
//        String jpaqlString = "select l from LanguageEntityJpa l where l.language = :language";
//        getLogger().info(jpaqlString);
//        Query query = getEntityManager().createQuery(jpaqlString);
//        query.setParameter("language", languageEntityJpa.getLanguage());
//
//        return query.getResultList();
//    }

    private Log getLogger() {
        return logger;
    }

}
